package com.app.adapter;

import java.util.ArrayList;
import com.app.data.ListDataModel;
import android.app.Activity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;

public class ADlistAdpter extends ADBaseAdpter {
	
	private ArrayList<ListDataModel> ticketdataList = new ArrayList<ListDataModel>();
	private ArrayList<ListDataModel> hoteldataList = new ArrayList<ListDataModel>();
	
	private ArrayList<ListDataModel> currentList = ticketdataList;
 	private LayoutInflater inflater;
	
 	
 	
	public ArrayList<ListDataModel> getCurrentList() {
		return currentList;
	}

	public void setCurrentList(ArrayList<ListDataModel> currentList) {
		this.currentList = currentList;
	}

	public ArrayList<ListDataModel> getTicketdataList() {
		return ticketdataList;
	}

	public void setTicketdataList(ArrayList<ListDataModel> ticketdataList) {
		this.ticketdataList = ticketdataList;
	}

	public ArrayList<ListDataModel> getHoteldataList() {
		return hoteldataList;
	}

	public void setHoteldataList(ArrayList<ListDataModel> hoteldataList) {
		this.hoteldataList = hoteldataList;
	}

	public ADlistAdpter(Activity activity) {
		super(activity);
		this.inflater =LayoutInflater.from(activity.getApplicationContext());
		
	}

	@Override
	public int getCount() {
		return currentList.size();
	}

	@Override
	public Object getItem(int position) {
		return position;
	}

	@Override
	public long getItemId(int position) {
		return position;
	}

	@Override
	public View getView(int position, View convertView, ViewGroup parent) {
		ListDataModel item = currentList.get(position);
		return item.mapInContentview(convertView,inflater);
	}
	class ViewHolder {
	    ImageView img;
	    TextView name;
	    TextView content;
	    TextView money;
	}
}
